Improve release caching and prevent download loops #307
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗣 Description
This PR addresses the concerns documented in issue #306
It seems some misconfigured clients can get into tight download loops that cause them to generate great amounts of network traffic to the Foundry release S3 bucket.
It makes the following changes:
CONTAINER_CACHE
would need to be set to enable caching.User-Agent
header that contains the name of the container and its version in the comments. e.g.;curl/7.80.0 (felddy/foundryvtt:9.255.0)
. This applies to bothcurl
andnode-fetch
requests.CONTAINER_CACHE
--verbose
flag tocurl
invocations whenCONTAINER_VERBOSE
is set.💭 Motivation and Context
These changes attempt to address the issue document in #306
Hopefully this will significantly lessen the network load on Foundry's release distribution bucket across the board, and specifically for containers that are crashing and re-downloading.
🧪 Testing
Tested locally and in CI.
✅ Checklist
the changes in this PR.